<%-- 
    Document   : productsDelete
    Created on : Aug 26, 2011, 6:56:30 PM
    Author     : Thanhnd
--%>

<%@page import="accessor.Products"%>
<%@page import="accessor.ProductsAccessor"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <% 
        ProductsAccessor pa = new ProductsAccessor();
        Products p = new Products();
        p.setProductID(Integer.parseInt(request.getParameter("id")));
        if(pa.deleteProducts(p)>0)
                       {
                       response.sendRedirect("products.jsp");                       
        }else{
                       response.sendRedirect("products.jsp?e=d");                       
        }
        %>
    </body>
</html>
